package com.ktjy.controller;

import org.springframework.web.servlet.view.UrlBasedViewResolver;

/**
 * @author 黄军艳
 * @version 1.0
 * @date 2024/12/16  9:39
 */
public class BaseController {

    /**
     * 转发任意路径
     */
    public String forward(String url){
        return UrlBasedViewResolver.FORWARD_URL_PREFIX+url;
    }

    /**
     * 重定向到任意路径
     */
    public String redirect(String url){
        return UrlBasedViewResolver.REDIRECT_URL_PREFIX+url;
    }
}
